home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / util / misc / InstallerFX.lha / InstallerFX / Examples / InstallerFX Example < prev    next >
Text File  |  1997-06-24  |  1KB  |  87 lines

  1. ; InstallerFX script
  2.  
  3. (onerror (CLEANUP))
  4.  
  5. ; Cleanup any temporary mess we created
  6. (procedure CLEANUP
  7.     ; Nothing to cleanup
  8.     (delete "t:Logopic")
  9.     (delete "t:Logopic.prefs")
  10. ) ; CLEANUP
  11.  
  12. (set @user-level 0)
  13.  
  14. ;(set Opt 3)
  15. ;(complete 0)
  16.  
  17. (copyfiles
  18.     (source "InstallerFX/InstallerFXlogo.gif")
  19.     (dest "t:")
  20.     (newname "Logopic")
  21. )
  22.  
  23. (copyfiles
  24.     (source "InstallerFX/InstallerFXLogo.prefs")
  25.     (dest "t:")
  26.     (newname "Logopic.prefs")
  27. )
  28.  
  29. (run "run InstallerFX/InstallerFX t:logopic")
  30.  
  31. (set @user-level 2)
  32.  
  33. ;Get directory to install test to:
  34. (set destdir 
  35.     (askdir 
  36.         (prompt "In which drawer should testfiles be installed?") 
  37.         (help @askdir-help)
  38.         (default ("t:"))
  39.     )
  40. )
  41.  
  42. (complete 10)
  43.  
  44. (set installfiles
  45.     (askoptions
  46.         (prompt "Which of the following optional programs/helpfile should be installed ?")
  47.         (help @askoptions-help)
  48.         (choices "InstallerFX")
  49.         (default Opt)
  50.     )
  51. )
  52.  
  53. (complete 50)
  54.  
  55. ;Copy program files to destination.
  56.  
  57. (if (BITAND installfiles 1)
  58. (copyfiles
  59.     (source "InstallerFX")
  60.     (dest destdir)
  61.     (all)
  62. )
  63. )
  64.  
  65. (set installfiles
  66.     (askoptions
  67.         (prompt "Which of the following optional programs/helpfile should be installed ?")
  68.         (help @askoptions-help)
  69.         (choices "InstallerFX")
  70.         (default Opt)
  71.     )
  72. )
  73.  
  74.  
  75. (if (BITAND installfiles 1)
  76. (copyfiles
  77.     (source "InstallerFX")
  78.     (dest destdir)
  79.     (all)
  80. )    
  81. )
  82.  
  83. (complete 100)
  84.  
  85. (CLEANUP)
  86. (exit)
  87.